﻿/*
------------------------------
    Rodeo Game Engine
    Rodeo Scene Module
    Scene.h - header file
    Copyright(c) Marcin Goryca
------------------------------
*/
#ifndef RODEO_SCENE_SCENE_H_
#define RODEO_SCENE_SCENE_H_

#ifndef RODEO_RENDERER_GL_GLLIBRARY_H_
#include "renderer\gl\gllibrary.h"
#endif    //RODEO_RENDERER_GLLIBRARY_H_

#ifndef RODEO_ENTITY_ENTITY_H_
#include "entity\entity.h"
#endif    //RODEO_ENTITY_ENTITY_H_

#ifndef RODEO_CORE_CONSTANTS_H_
#include "core\constants.h"
#endif    //RODEO_CORE_CONSTANTS_H_

#ifndef LIST_H_
#include <list>
#endif    //LIST_H_

namespace rodeorenderer
{
class RenderState;
}
namespace rodeoscene
{
class Scene
{
public:
    Scene()
    :node_count_(0)
    {}
    
    ~Scene(){}

    void addChild(rodeoentity::Entity* entity);
    void removeChild(rodeoentity::Entity* entity);
    void removeChild();

    // Allows clear entire scene
    void clear();

    void render();
    void update(float dt);

    void onEvent();

    rodeorenderer::RenderState* getState()const { return render_state_; }

    rodeocore::ui getNodeCount()const { return node_count_; }

//==== [ MEMBERS ] ====//
protected:
    rodeorenderer::RenderState* render_state_;
    std::list<rodeoentity::Entity*> node_;
private:
    rodeocore::ui node_count_;
    static rodeocore::ui children_;
};
}    //end of rodeoscene namespace
#endif    //RODEO_SCENE_SCENE_H_